<!DOCTYPE html>
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layout}">

<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />

    <title th:text="#{cas.login.pagetitle}">CAS Admin Login View</title>
    <link href="../../static/css/cas.css" rel="stylesheet" th:href="@{${#themes.code('cas.standard.css.file')}}"/>
</head>

<body class="login">
<main role="main" class="container mt-3 mb-3">
    <div layout:fragment="content" class="row">
        <section class="col-lg-6 offset-lg-3 col-xs-12">
            <div class="card-header text-center d-flex justify-content-center mb-4">
                <h2 th:text="#{cas.login.pagetitle}" class="mr-2">Login</h2>
                <i class="mdi mdi-shield-lock-outline"></i>
            </div>
            <form name="fm1" th:action="@{/adminlogin}" method="post">
                <div th:if="${param.error}" class="alert alert-error">Invalid credentials.</div>
            
                <h3 th:utext="#{screen.welcome.instructions}">Enter your Username and Password</h3>
            
                <section class="cas-field my-3">
                    <div class="mdc-text-field d-flex">
                        <input class="mdc-text-field__input"
                            id="username"
                            name="username"
                            size="25"
                            type="text"
                            autocomplete="off" />
                        <label for="username" class="mdc-floating-label" th:utext="#{screen.welcome.label.netid}">Username</label>
                    </div>
                </section>
            
                <section class="cas-field my-3">
                    <div class="mdc-text-field mdc-text-field--with-trailing-icon d-flex caps-check">
                        <input class="mdc-text-field__input"
                            type="password"
                            name="password"
                            id="password"
                            size="25"
                            autocomplete="off" />
                        <i class="mdi mdi-alert mdc-text-field__icon text-danger caps-warn"></i>
                        <label for="password" class="mdc-floating-label" th:utext="#{screen.welcome.label.password}">Password</label>
                    </div>
                    <div class="mdc-text-field-helper-line caps-warn">
                        <p
                            class="mdc-text-field-helper-text mdc-text-field-helper-text--persistent mdc-text-field-helper-text--validation-msg text-danger">
                            <span th:utext="#{screen.capslock.on}" />
                        </p>
                    </div>
                </section>
            
                <button class="mdc-button mdc-button--raised"
                    accesskey="l"
                    th:value="#{screen.welcome.button.login}"
                    value="Login">
                    <span class="mdc-button__label" th:value="#{screen.welcome.button.login}">Login</span>
                </button>
            </form>
        </div>
    </div>
</main>
</body>
</html>